package com.bh.shipment.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.bh.common.annotation.Dict;
import com.bh.common.annotation.Excel;
import com.bh.common.core.domain.BhtmsBaseEntity;
import com.bh.ledger.domain.JcLedgerDetail;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.io.Serializable;
import java.util.List;

/**
 * 运单模板对象 jc_shipment_template
 *
 * @author slx
 * @date 2023-04-22
 */
@EqualsAndHashCode(callSuper = true)
@TableName("jc_shipment_template")
@Data
public class JcShipmentTemplate extends BhtmsBaseEntity implements Serializable {
    

    /**
     * 承运商类型
     */
    @Excel(name = "承运商类型")
    private Long carrierType;

    /**
     * 付款方式
     */
    @Excel(name = "付款方式")
    private Integer feeType;

    /**
     * 车牌号
     */
    @Excel(name = "车牌号")
    private String license;

    /**
     * 运作模式
     */
    @Excel(name = "运作模式")
    private Integer operationPattern;  //运作模式  -- 自营车辆    ----干线外包   ----外包中转   ---

    /**
     * 司机名称
     */
    @Excel(name = "司机名称")
    private String outDriver;

    /**
     * 运输方式
     */
    @Excel(name = "运输方式")
    private Integer shipmentMethod;

    /**
     * 运输协议号
     */
    @Excel(name = "运输协议号")
    private String tan;

    /**
     * 承运商
     */
    @Dict(dictTable = "jc_carrier", dictLabel = "name", dictValue = "id")
    @Excel(name = "承运商")
    private Long jcCarrierId;

    /**
     * 司机
     */
    @Dict(dictTable = "jc_driver", dictLabel = "name", dictValue = "id")
    @Excel(name = "司机")
    private Long jcDriverId;

    /**
     * 组织ID
     */
    @Dict(dictTable = "jc_sys_organization", dictLabel = "name", dictValue = "id")
    @Excel(name = "组织ID")
    private Long jcOrganizationId;

    /**
     * 车型ID
     */
    @Dict(dictTable = "jc_vehicle", dictLabel = "code", dictValue = "id")
    @Excel(name = "车型ID")
    private Long jcVehicleId;

    /**
     * 车头ID
     */
    @Dict(dictTable = "jc_vehicle_head", dictLabel = "name", dictValue = "id")
    @Excel(name = "车头ID")
    private Long jcVehicleHeadId;

    /**
     * 经由站组织机构集合
     */
    @Dict(dictTable = "jc_sys_organization", dictLabel = "name", dictValue = "id")
    @Excel(name = "经由站组织机构集合")
    private String orgIds;

    /**
     * 司机电话
     */
    @Excel(name = "司机电话")
    private String outPhone;

    /**
     * 起运站ID
     */
    @Dict(dictTable = "jc_sys_organization", dictLabel = "name", dictValue = "id")
    @Excel(name = "起运站ID")
    private Long jcFromOrganizationId;

    /**
     * 目的站ID
     */
    @Dict(dictTable = "jc_sys_organization", dictLabel = "name", dictValue = "id")
    @Excel(name = "目的站ID")
    private Long jcToOrganizationId;

    /** 台帐明细信息 */
    @TableField(exist = false)
    private List<JcLedgerDetail> jcLedgerDetailList;


    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("code", getCode())
                .append("createName", getCreateName())
                .append("createTime", getCreateTime())
                .append("description", getDescription())
               
                .append("modifyName", getModifyName())
                .append("modifyTime", getModifyTime())
                .append("name", getName())
                .append("status", getStatus())
                .append("carrierType", getCarrierType())
                .append("feeType", getFeeType())
                .append("license", getLicense())
                .append("operationPattern", getOperationPattern())
                .append("outDriver", getOutDriver())
                .append("shipmentMethod", getShipmentMethod())
                .append("tan", getTan())
                .append("jcCarrierId", getJcCarrierId())
                .append("jcDriverId", getJcDriverId())
                .append("jcOrganizationId", getJcOrganizationId())
                .append("jcVehicleId", getJcVehicleId())
                .append("jcVehicleHeadId", getJcVehicleHeadId())
                .append("orgIds", getOrgIds())
                .append("outPhone", getOutPhone())
                .append("jcFromOrganizationId", getJcFromOrganizationId())
                .append("jcToOrganizationId", getJcToOrganizationId())
                .toString();
    }
}
